/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Zachary
 */


import java.util.ArrayList;

public class User_Profile {
    private String user_name;
    private int user_pin;
    private ArrayList<workout_session> session_list;
    private boolean logged_in;
    //Instance Constructor
    public User_Profile(){
        user_name = "Guest";
        user_pin = 0;
        session_list = new ArrayList<workout_session>();
        logged_in = false;
    }
    //user_name accessors
    public String get_user_name(){
        return user_name;      
    }
    public void set_user_name(String value){
        user_name = value;
    }
    //user_pin accessors
    public int get_pin(){
        return user_pin;
    }
    public void set_pin(int value){
        user_pin = value;
    }
    //Create new workout session
    public workout_session new_session(){
        workout_session ns = new workout_session();
        session_list.add(ns);
        return ns;
    }
    //Get a previous workout session from the user's history
    public workout_session get_session(int session_number){
        if (session_number < session_list.size()){
            return session_list.get(session_number);
        }
        return null;
    }
    //Returns the number of run sessions for this user.
    public int get_session_count(){
        return session_list.size();
    }
    //accessors for login status
    public boolean get_logged_in(){
        return logged_in;
    }
    public void set_logged_in(boolean value){
        logged_in = true;
    }        
}
